package us.yesor.atlast;

import us.yesor.atlast.R;
import us.yesor.atlast.R.layout;
import us.yesor.atlast.R.menu;
import android.os.Bundle;
import android.app.Activity;
import android.app.ListActivity;
import android.content.Intent;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.ArrayAdapter;

public class CollectionManagementActivity extends ListActivity
{

    @Override
    public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_collection_management);
        this.setupListView();
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu)
    {
        getMenuInflater().inflate(R.menu.activity_collection_management, menu);
        return true;
    }
    
    private void setupListView()
    {
        String[] sampleItems = new String[]{"Animals", "Equipment", "Employees"};
        ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, sampleItems);
        this.setListAdapter(adapter);
    }
    
    public void itemManagement(View v)
    {
        Intent intent = new Intent(this, ItemManagementActivity.class);
        this.startActivity(intent);
    }
    
    public void newCollection(View v)
    {
        Intent intent = new Intent(this, NewCollectionActivity.class);
        this.startActivity(intent);
    }
}
